package org.dxy.api.response;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @description:
 * @author: Administrator
 * @createTime: 2025/5/3 19:53
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Route {
    private String path;
    private String name;
    private String redirect;
    private String component;
    private Meta meta;
    private List<Route> children;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Meta {
        private String icon;
        private String title;
        private String isLink;
        private boolean isHide;
        private boolean isFull;
        private boolean isAffix;
        private boolean isKeepAlive;
        private String activeMenu;  // for routes with `activeMenu` meta
    }

    // 1. 构建单一的首页路由实例
    public static Route buildHomeRoute() {
        Meta homeMeta = Meta.builder()
                .icon("HomeFilled")
                .title("首页")
                .isLink("")
                .isHide(false)
                .isFull(false)
                .isAffix(true)
                .isKeepAlive(true)
                .build();

        return Route.builder()
                .path("/home/index")
                .name("home")
                .component("/home/index")
                .meta(homeMeta)
                .build();
    }


    // 2.构造数据大屏路由的私有方法
    public static Route buildDataScreenRoute() {
        Meta dataScreenMeta = Meta.builder()
                .icon("Histogram")
                .title("数据大屏")
                .isLink("")
                .isHide(false)
                .isFull(true)
                .isAffix(false)
                .isKeepAlive(true)
                .build();

        return Route.builder()
                .path("/dataScreen")
                .name("dataScreen")
                .component("/dataScreen/index")
                .meta(dataScreenMeta)
                .build();
    }



    public static Route buildProTableRoute() {
        Meta proTableMeta = Meta.builder()
                .icon("MessageBox")
                .title("超级表格")
                .isLink("")
                .isHide(false)
                .isFull(false)
                .isAffix(false)
                .isKeepAlive(true)
                .build();

        Route useProTableRoute = Route.builder()
                .path("/proTable/useProTable")
                .name("useProTable")
                .component("/proTable/useProTable/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("使用 ProTable")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .children(List.of(
                        Route.builder()
                                .path("/proTable/useProTable/detail/:id")
                                .name("useProTableDetail")
                                .component("/proTable/useProTable/detail")
                                .meta(Meta.builder()
                                        .icon("Menu")
                                        .title("ProTable 详情")
                                        .isLink("")
                                        .isHide(true)
                                        .isFull(false)
                                        .isAffix(false)
                                        .isKeepAlive(true)
                                        .activeMenu("/proTable/useProTable")
                                        .build())
                                .build()
                ))
                .build();

        Route useTreeFilterRoute = Route.builder()
                .path("/proTable/useTreeFilter")
                .name("useTreeFilter")
                .component("/proTable/useTreeFilter/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("使用 TreeFilter")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route useTreeFilterDetailRoute = Route.builder()
                .path("/proTable/useTreeFilter/detail/:id")
                .name("useTreeFilterDetail")
                .component("/proTable/useTreeFilter/detail")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("TreeFilter 详情")
                        .activeMenu("/proTable/useTreeFilter")
                        .isLink("")
                        .isHide(true)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route useSelectFilterRoute = Route.builder()
                .path("/proTable/useSelectFilter")
                .name("useSelectFilter")
                .component("/proTable/useSelectFilter/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("使用 SelectFilter")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route treeProTableRoute = Route.builder()
                .path("/proTable/treeProTable")
                .name("treeProTable")
                .component("/proTable/treeProTable/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("树形 ProTable")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route complexProTableRoute = Route.builder()
                .path("/proTable/complexProTable")
                .name("complexProTable")
                .component("/proTable/complexProTable/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("复杂 ProTable")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route proTableDocumentRoute = Route.builder()
                .path("/proTable/document")
                .name("proTableDocument")
                .component("/proTable/document/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("ProTable 文档")
                        .isLink("https://juejin.cn/post/7166068828202336263/#heading-14")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        return Route.builder()
                .path("/proTable")
                .name("proTable")
                .redirect("/proTable/useProTable")
                .meta(proTableMeta)
                .children(List.of(
                        useProTableRoute,
                        useTreeFilterRoute,
                        useTreeFilterDetailRoute,
                        useSelectFilterRoute,
                        treeProTableRoute,
                        complexProTableRoute,
                        proTableDocumentRoute
                ))
                .build();
    }

    // 4.权限管理 路由结构
    public static Route buildAuthRoute() {
        Meta authMeta = Meta.builder()
                .icon("Lock")
                .title("权限管理")
                .isLink("")
                .isHide(false)
                .isFull(false)
                .isAffix(false)
                .isKeepAlive(true)
                .build();

        Route authMenuRoute = Route.builder()
                .path("/auth/menu")
                .name("authMenu")
                .component("/auth/menu/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("菜单权限")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route authButtonRoute = Route.builder()
                .path("/auth/button")
                .name("authButton")
                .component("/auth/button/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("按钮权限")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        return Route.builder()
                .path("/auth")
                .name("auth")
                .redirect("/auth/menu")
                .meta(authMeta)
                .children(List.of(
                        authMenuRoute,
                        authButtonRoute
                ))
                .build();
    }

    // 5.  常用组件 路由结构，
    public static Route buildAssemblyRoute() {
        Meta assemblyMeta = Meta.builder()
                .icon("Briefcase")
                .title("常用组件")
                .isLink("")
                .isHide(false)
                .isFull(false)
                .isAffix(false)
                .isKeepAlive(true)
                .build();

        Route guideRoute = Route.builder()
                .path("/assembly/guide")
                .name("guide")
                .component("/assembly/guide/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("引导页")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route tabsRoute = Route.builder()
                .path("/assembly/tabs")
                .name("tabs")
                .component("/assembly/tabs/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("标签页操作")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .children(List.of(
                        Route.builder()
                                .path("/assembly/tabs/detail/:id")
                                .name("tabsDetail")
                                .component("/assembly/tabs/detail")
                                .meta(Meta.builder()
                                        .icon("Menu")
                                        .title("Tab 详情")
                                        .activeMenu("/assembly/tabs")
                                        .isLink("")
                                        .isHide(true)
                                        .isFull(false)
                                        .isAffix(false)
                                        .isKeepAlive(true)
                                        .build())
                                .build()
                ))
                .build();

        Route selectIconRoute = Route.builder()
                .path("/assembly/selectIcon")
                .name("selectIcon")
                .component("/assembly/selectIcon/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("图标选择器")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route selectFilterRoute = Route.builder()
                .path("/assembly/selectFilter")
                .name("selectFilter")
                .component("/assembly/selectFilter/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("分类筛选器")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route treeFilterRoute = Route.builder()
                .path("/assembly/treeFilter")
                .name("treeFilter")
                .component("/assembly/treeFilter/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("树形筛选器")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route svgIconRoute = Route.builder()
                .path("/assembly/svgIcon")
                .name("svgIcon")
                .component("/assembly/svgIcon/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("SVG 图标")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route uploadFileRoute = Route.builder()
                .path("/assembly/uploadFile")
                .name("uploadFile")
                .component("/assembly/uploadFile/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("文件上传")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route batchImportRoute = Route.builder()
                .path("/assembly/batchImport")
                .name("batchImport")
                .component("/assembly/batchImport/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("批量添加数据")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route wangEditorRoute = Route.builder()
                .path("/assembly/wangEditor")
                .name("wangEditor")
                .component("/assembly/wangEditor/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("富文本编辑器")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route draggableRoute = Route.builder()
                .path("/assembly/draggable")
                .name("draggable")
                .component("/assembly/draggable/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("拖拽组件")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        return Route.builder()
                .path("/assembly")
                .name("assembly")
                .redirect("/assembly/guide")
                .meta(assemblyMeta)
                .children(List.of(
                        guideRoute,
                        tabsRoute,
                        selectIconRoute,
                        selectFilterRoute,
                        treeFilterRoute,
                        svgIconRoute,
                        uploadFileRoute,
                        batchImportRoute,
                        wangEditorRoute,
                        draggableRoute
                ))
                .build();
    }

    // 6.Dashboard（含子菜单）
    public static Route buildDashboardRoute() {
        Meta dashboardMeta = Meta.builder()
                .icon("Odometer")
                .title("Dashboard")
                .isLink("")
                .isHide(false)
                .isFull(false)
                .isAffix(false)
                .isKeepAlive(true)
                .build();

        Route dataVisualizeRoute = Route.builder()
                .path("/dashboard/dataVisualize")
                .name("dataVisualize")
                .component("/dashboard/dataVisualize/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("数据可视化")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        return Route.builder()
                .path("/dashboard")
                .name("dashboard")
                .redirect("/dashboard/dataVisualize")
                .meta(dashboardMeta)
                .children(List.of(dataVisualizeRoute))
                .build();
    }

    // 7. 表单 Form（含子菜单）
    public static Route buildFormRoute() {
        Meta formMeta = Meta.builder()
                .icon("Tickets")
                .title("表单 Form")
                .isLink("")
                .isHide(false)
                .isFull(false)
                .isAffix(false)
                .isKeepAlive(true)
                .build();

        Route proFormRoute = Route.builder()
                .path("/form/proForm")
                .name("proForm")
                .component("/form/proForm/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("超级 Form")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route basicFormRoute = Route.builder()
                .path("/form/basicForm")
                .name("basicForm")
                .component("/form/basicForm/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("基础 Form")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route validateFormRoute = Route.builder()
                .path("/form/validateForm")
                .name("validateForm")
                .component("/form/validateForm/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("校验 Form")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route dynamicFormRoute = Route.builder()
                .path("/form/dynamicForm")
                .name("dynamicForm")
                .component("/form/dynamicForm/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("动态 Form")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        return Route.builder()
                .path("/form")
                .name("form")
                .redirect("/form/proForm")
                .meta(formMeta)
                .children(List.of(proFormRoute, basicFormRoute, validateFormRoute, dynamicFormRoute))
                .build();
    }

    // 8. ECharts（含子菜单）
    public static Route buildEChartsRoute() {
        Meta echartsMeta = Meta.builder()
                .icon("TrendCharts")
                .title("ECharts")
                .isLink("")
                .isHide(false)
                .isFull(false)
                .isAffix(false)
                .isKeepAlive(true)
                .build();

        Route waterChartRoute = Route.builder()
                .path("/echarts/waterChart")
                .name("waterChart")
                .component("/echarts/waterChart/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("水型图")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route columnChartRoute = Route.builder()
                .path("/echarts/columnChart")
                .name("columnChart")
                .component("/echarts/columnChart/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("柱状图")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route lineChartRoute = Route.builder()
                .path("/echarts/lineChart")
                .name("lineChart")
                .component("/echarts/lineChart/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("折线图")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route pieChartRoute = Route.builder()
                .path("/echarts/pieChart")
                .name("pieChart")
                .component("/echarts/pieChart/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("饼图")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route radarChartRoute = Route.builder()
                .path("/echarts/radarChart")
                .name("radarChart")
                .component("/echarts/radarChart/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("雷达图")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route nestedChartRoute = Route.builder()
                .path("/echarts/nestedChart")
                .name("nestedChart")
                .component("/echarts/nestedChart/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("嵌套环形图")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        return Route.builder()
                .path("/echarts")
                .name("echarts")
                .redirect("/echarts/waterChart")
                .meta(echartsMeta)
                .children(List.of(waterChartRoute, columnChartRoute, lineChartRoute, pieChartRoute, radarChartRoute, nestedChartRoute))
                .build();
    }

    // 9. 自定义指令（含子菜单）
    public static Route buildDirectivesRoute() {
        Meta directivesMeta = Meta.builder()
                .icon("Stamp")
                .title("自定义指令")
                .isLink("")
                .isHide(false)
                .isFull(false)
                .isAffix(false)
                .isKeepAlive(true)
                .build();

        Route copyDirectRoute = Route.builder()
                .path("/directives/copyDirect")
                .name("copyDirect")
                .component("/directives/copyDirect/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("复制指令")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route watermarkDirectRoute = Route.builder()
                .path("/directives/watermarkDirect")
                .name("watermarkDirect")
                .component("/directives/watermarkDirect/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("水印指令")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route dragDirectRoute = Route.builder()
                .path("/directives/dragDirect")
                .name("dragDirect")
                .component("/directives/dragDirect/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("拖拽指令")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route debounceDirectRoute = Route.builder()
                .path("/directives/debounceDirect")
                .name("debounceDirect")
                .component("/directives/debounceDirect/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("防抖指令")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route throttleDirectRoute = Route.builder()
                .path("/directives/throttleDirect")
                .name("throttleDirect")
                .component("/directives/throttleDirect/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("节流指令")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route longpressDirectRoute = Route.builder()
                .path("/directives/longpressDirect")
                .name("longpressDirect")
                .component("/directives/longpressDirect/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("长按指令")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        return Route.builder()
                .path("/directives")
                .name("directives")
                .redirect("/directives/copyDirect")
                .meta(directivesMeta)
                .children(List.of(copyDirectRoute, watermarkDirectRoute, dragDirectRoute, debounceDirectRoute, throttleDirectRoute, longpressDirectRoute))
                .build();
    }


    // 10. 菜单嵌套（含子菜单）
    public static Route buildMenuRoute() {
        Meta menuMeta = Meta.builder()
                .icon("List")
                .title("菜单嵌套")
                .isLink("")
                .isHide(false)
                .isFull(false)
                .isAffix(false)
                .isKeepAlive(true)
                .build();

        Route menu1Route = Route.builder()
                .path("/menu/menu1")
                .name("menu1")
                .component("/menu/menu1/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("菜单1")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route menu21Route = Route.builder()
                .path("/menu/menu2/menu21")
                .name("menu21")
                .component("/menu/menu2/menu21/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("菜单2-1")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route menu221Route = Route.builder()
                .path("/menu/menu2/menu22/menu221")
                .name("menu221")
                .component("/menu/menu2/menu22/menu221/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("菜单2-2-1")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route menu222Route = Route.builder()
                .path("/menu/menu2/menu22/menu222")
                .name("menu222")
                .component("/menu/menu2/menu22/menu222/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("菜单2-2-2")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route menu23Route = Route.builder()
                .path("/menu/menu2/menu23")
                .name("menu23")
                .component("/menu/menu2/menu23/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("菜单2-3")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route menu2Route = Route.builder()
                .path("/menu/menu2")
                .name("menu2")
                .redirect("/menu/menu2/menu21")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("菜单2")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .children(List.of(menu21Route, menu221Route, menu222Route, menu23Route))
                .build();

        Route menu3Route = Route.builder()
                .path("/menu/menu3")
                .name("menu3")
                .component("/menu/menu3/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("菜单3")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        return Route.builder()
                .path("/menu")
                .name("menu")
                .redirect("/menu/menu1")
                .meta(menuMeta)
                .children(List.of(menu1Route, menu2Route, menu3Route))
                .build();
    }


    // 11. 系统管理（含子菜单）
    public static Route buildSystemRoute() {
        Meta systemMeta = Meta.builder()
                .icon("Tools")
                .title("系统管理")
                .isLink("")
                .isHide(false)
                .isFull(false)
                .isAffix(false)
                .isKeepAlive(true)
                .build();

        Route accountManageRoute = Route.builder()
                .path("/system/accountManage")
                .name("accountManage")
                .component("/system/accountManage/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("账号管理")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route roleManageRoute = Route.builder()
                .path("/system/roleManage")
                .name("roleManage")
                .component("/system/roleManage/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("角色管理")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route menuMangeRoute = Route.builder()
                .path("/system/menuMange")
                .name("menuMange")
                .component("/system/menuMange/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("菜单管理")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route departmentManageRoute = Route.builder()
                .path("/system/departmentManage")
                .name("departmentManage")
                .component("/system/departmentManage/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("部门管理")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route dictManageRoute = Route.builder()
                .path("/system/dictManage")
                .name("dictManage")
                .component("/system/dictManage/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("字典管理")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route timingTaskRoute = Route.builder()
                .path("/system/timingTask")
                .name("timingTask")
                .component("/system/timingTask/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("定时任务")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route systemLogRoute = Route.builder()
                .path("/system/systemLog")
                .name("systemLog")
                .component("/system/systemLog/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("系统日志")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        return Route.builder()
                .path("/system")
                .name("system")
                .redirect("/system/accountManage")
                .meta(systemMeta)
                .children(List.of(accountManageRoute, roleManageRoute, menuMangeRoute, departmentManageRoute, dictManageRoute, timingTaskRoute, systemLogRoute))
                .build();
    }

    // 12. 外部链接（含子菜单）
    public static Route buildLinkRoute() {
        Meta linkMeta = Meta.builder()
                .icon("Paperclip")
                .title("外部链接")
                .isLink("")
                .isHide(false)
                .isFull(false)
                .isAffix(false)
                .isKeepAlive(true)
                .build();

        Route bingRoute = Route.builder()
                .path("/link/bing")
                .name("bing")
                .component("/link/bing/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("Bing 内嵌")
                        .isLink("")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route giteeRoute = Route.builder()
                .path("/link/gitee")
                .name("gitee")
                .component("/link/gitee/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("Gitee 仓库")
                        .isLink("https://gitee.com/HalseySpicy/Geeker-Admin")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route githubRoute = Route.builder()
                .path("/link/github")
                .name("github")
                .component("/link/github/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("GitHub 仓库")
                        .isLink("https://github.com/HalseySpicy/Geeker-Admin")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route docsRoute = Route.builder()
                .path("/link/docs")
                .name("docs")
                .component("/link/docs/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("项目文档")
                        .isLink("https://docs.spicyboy.cn")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        Route juejinRoute = Route.builder()
                .path("/link/juejin")
                .name("juejin")
                .component("/link/juejin/index")
                .meta(Meta.builder()
                        .icon("Menu")
                        .title("掘金主页")
                        .isLink("https://juejin.cn/user/3263814531551816/posts")
                        .isHide(false)
                        .isFull(false)
                        .isAffix(false)
                        .isKeepAlive(true)
                        .build())
                .build();

        return Route.builder()
                .path("/link")
                .name("link")
                .redirect("/link/bing")
                .meta(linkMeta)
                .children(List.of(bingRoute, giteeRoute, githubRoute, docsRoute, juejinRoute))
                .build();
    }




}
